package com;

public class Test {
    //主线程
    public static void main(String[] args) {
        //获取打印线程名称  Thread
       /* Thread thread = new Thread();
        thread.setName("主线程");*/
        Thread.currentThread().setName("主线程");
        String name = Thread.currentThread().getName();
        System.out.println(name);
    }
}
